<?php
$tdatacommercial_invoices=array();
	$tdatacommercial_invoices[".NumberOfChars"]=80; 
	$tdatacommercial_invoices[".ShortName"]="commercial_invoices";
	$tdatacommercial_invoices[".OwnerID"]="";
	$tdatacommercial_invoices[".OriginalTable"]="commercial_invoices";


	
//	field labels
$fieldLabelscommercial_invoices = array();
if(mlang_getcurrentlang()=="English")
{
	$fieldLabelscommercial_invoices["English"]=array();
	$fieldToolTipscommercial_invoices["English"]=array();
	$fieldLabelscommercial_invoices["English"]["id"] = "Id";
	$fieldToolTipscommercial_invoices["English"]["id"] = "";
	$fieldLabelscommercial_invoices["English"]["account_id"] = "Account";
	$fieldToolTipscommercial_invoices["English"]["account_id"] = "";
	$fieldLabelscommercial_invoices["English"]["buyer_id"] = "Buyer";
	$fieldToolTipscommercial_invoices["English"]["buyer_id"] = "";
	$fieldLabelscommercial_invoices["English"]["consignee_id"] = "Consignee";
	$fieldToolTipscommercial_invoices["English"]["consignee_id"] = "";
	$fieldLabelscommercial_invoices["English"]["notify_id"] = "Notify";
	$fieldToolTipscommercial_invoices["English"]["notify_id"] = "";
	$fieldLabelscommercial_invoices["English"]["commercial_invoice_no"] = "Invoice No";
	$fieldToolTipscommercial_invoices["English"]["commercial_invoice_no"] = "";
	$fieldLabelscommercial_invoices["English"]["commercial_invoice_date"] = "Invoice Date";
	$fieldToolTipscommercial_invoices["English"]["commercial_invoice_date"] = "";
	$fieldLabelscommercial_invoices["English"]["customer_purchase_order_no"] = "Customer PO No";
	$fieldToolTipscommercial_invoices["English"]["customer_purchase_order_no"] = "";
	$fieldLabelscommercial_invoices["English"]["bl_awb_no"] = "BL/ AWB No";
	$fieldToolTipscommercial_invoices["English"]["bl_awb_no"] = "";
	$fieldLabelscommercial_invoices["English"]["country_id"] = "Country ";
	$fieldToolTipscommercial_invoices["English"]["country_id"] = "";
	$fieldLabelscommercial_invoices["English"]["export_date"] = "Export Date";
	$fieldToolTipscommercial_invoices["English"]["export_date"] = "";
	$fieldLabelscommercial_invoices["English"]["payment_term"] = "Payment Term";
	$fieldToolTipscommercial_invoices["English"]["payment_term"] = "";
	$fieldLabelscommercial_invoices["English"]["export_references"] = "Export References";
	$fieldToolTipscommercial_invoices["English"]["export_references"] = "";
	$fieldLabelscommercial_invoices["English"]["export_route"] = "Export Route";
	$fieldToolTipscommercial_invoices["English"]["export_route"] = "";
	$fieldLabelscommercial_invoices["English"]["package_marks"] = "Package Marks";
	$fieldToolTipscommercial_invoices["English"]["package_marks"] = "";
	$fieldLabelscommercial_invoices["English"]["misc_charges"] = "Misc Charges";
	$fieldToolTipscommercial_invoices["English"]["misc_charges"] = "";
	$fieldLabelscommercial_invoices["English"]["certifications"] = "Certifications";
	$fieldToolTipscommercial_invoices["English"]["certifications"] = "";
	$fieldLabelscommercial_invoices["English"]["account_name"] = "Account Name";
	$fieldToolTipscommercial_invoices["English"]["account_name"] = "";
	$fieldLabelscommercial_invoices["English"]["buyer"] = "Buyer";
	$fieldToolTipscommercial_invoices["English"]["buyer"] = "";
	$fieldLabelscommercial_invoices["English"]["consignee"] = "Consignee";
	$fieldToolTipscommercial_invoices["English"]["consignee"] = "";
	$fieldLabelscommercial_invoices["English"]["notify"] = "Notify";
	$fieldToolTipscommercial_invoices["English"]["notify"] = "";
	$fieldLabelscommercial_invoices["English"]["proforma_invoice_id"] = "Proforma Invoice Id";
	$fieldToolTipscommercial_invoices["English"]["proforma_invoice_id"] = "";
	if (count($fieldToolTipscommercial_invoices["English"])){
		$tdatacommercial_invoices[".isUseToolTips"]=true;
	}
}
if(mlang_getcurrentlang()=="Chinese (Hong Kong S.A.R.)")
{
	$fieldLabelscommercial_invoices["Chinese (Hong Kong S.A.R.)"]=array();
	$fieldToolTipscommercial_invoices["Chinese (Hong Kong S.A.R.)"]=array();
	$fieldLabelscommercial_invoices["Chinese (Hong Kong S.A.R.)"]["id"] = "Id";
	$fieldToolTipscommercial_invoices["Chinese (Hong Kong S.A.R.)"]["id"] = "";
	$fieldLabelscommercial_invoices["Chinese (Hong Kong S.A.R.)"]["account_id"] = "Account Id";
	$fieldToolTipscommercial_invoices["Chinese (Hong Kong S.A.R.)"]["account_id"] = "";
	$fieldLabelscommercial_invoices["Chinese (Hong Kong S.A.R.)"]["buyer_id"] = "Buyer Id";
	$fieldToolTipscommercial_invoices["Chinese (Hong Kong S.A.R.)"]["buyer_id"] = "";
	$fieldLabelscommercial_invoices["Chinese (Hong Kong S.A.R.)"]["consignee_id"] = "Consignee Id";
	$fieldToolTipscommercial_invoices["Chinese (Hong Kong S.A.R.)"]["consignee_id"] = "";
	$fieldLabelscommercial_invoices["Chinese (Hong Kong S.A.R.)"]["notify_id"] = "Notify Id";
	$fieldToolTipscommercial_invoices["Chinese (Hong Kong S.A.R.)"]["notify_id"] = "";
	$fieldLabelscommercial_invoices["Chinese (Hong Kong S.A.R.)"]["commercial_invoice_no"] = "Commercial Invoice No";
	$fieldToolTipscommercial_invoices["Chinese (Hong Kong S.A.R.)"]["commercial_invoice_no"] = "";
	$fieldLabelscommercial_invoices["Chinese (Hong Kong S.A.R.)"]["commercial_invoice_date"] = "Commercial Invoice Date";
	$fieldToolTipscommercial_invoices["Chinese (Hong Kong S.A.R.)"]["commercial_invoice_date"] = "";
	$fieldLabelscommercial_invoices["Chinese (Hong Kong S.A.R.)"]["customer_purchase_order_no"] = "Customer Purchase Order No";
	$fieldToolTipscommercial_invoices["Chinese (Hong Kong S.A.R.)"]["customer_purchase_order_no"] = "";
	$fieldLabelscommercial_invoices["Chinese (Hong Kong S.A.R.)"]["bl_awb_no"] = "BL / AWB No";
	$fieldToolTipscommercial_invoices["Chinese (Hong Kong S.A.R.)"]["bl_awb_no"] = "";
	$fieldLabelscommercial_invoices["Chinese (Hong Kong S.A.R.)"]["country_id"] = "Country";
	$fieldToolTipscommercial_invoices["Chinese (Hong Kong S.A.R.)"]["country_id"] = "";
	$fieldLabelscommercial_invoices["Chinese (Hong Kong S.A.R.)"]["export_date"] = "Export Date";
	$fieldToolTipscommercial_invoices["Chinese (Hong Kong S.A.R.)"]["export_date"] = "";
	$fieldLabelscommercial_invoices["Chinese (Hong Kong S.A.R.)"]["payment_term"] = "Payment Term";
	$fieldToolTipscommercial_invoices["Chinese (Hong Kong S.A.R.)"]["payment_term"] = "";
	$fieldLabelscommercial_invoices["Chinese (Hong Kong S.A.R.)"]["export_references"] = "Export References";
	$fieldToolTipscommercial_invoices["Chinese (Hong Kong S.A.R.)"]["export_references"] = "";
	$fieldLabelscommercial_invoices["Chinese (Hong Kong S.A.R.)"]["export_route"] = "Export Route";
	$fieldToolTipscommercial_invoices["Chinese (Hong Kong S.A.R.)"]["export_route"] = "";
	$fieldLabelscommercial_invoices["Chinese (Hong Kong S.A.R.)"]["package_marks"] = "Package Marks";
	$fieldToolTipscommercial_invoices["Chinese (Hong Kong S.A.R.)"]["package_marks"] = "";
	$fieldLabelscommercial_invoices["Chinese (Hong Kong S.A.R.)"]["misc_charges"] = "Misc Charges";
	$fieldToolTipscommercial_invoices["Chinese (Hong Kong S.A.R.)"]["misc_charges"] = "";
	$fieldLabelscommercial_invoices["Chinese (Hong Kong S.A.R.)"]["certifications"] = "Certifications";
	$fieldToolTipscommercial_invoices["Chinese (Hong Kong S.A.R.)"]["certifications"] = "";
	$fieldLabelscommercial_invoices["Chinese (Hong Kong S.A.R.)"]["account_name"] = "Account Name";
	$fieldToolTipscommercial_invoices["Chinese (Hong Kong S.A.R.)"]["account_name"] = "";
	$fieldLabelscommercial_invoices["Chinese (Hong Kong S.A.R.)"]["buyer"] = "Buyer";
	$fieldToolTipscommercial_invoices["Chinese (Hong Kong S.A.R.)"]["buyer"] = "";
	$fieldLabelscommercial_invoices["Chinese (Hong Kong S.A.R.)"]["consignee"] = "Consignee";
	$fieldToolTipscommercial_invoices["Chinese (Hong Kong S.A.R.)"]["consignee"] = "";
	$fieldLabelscommercial_invoices["Chinese (Hong Kong S.A.R.)"]["notify"] = "Notify";
	$fieldToolTipscommercial_invoices["Chinese (Hong Kong S.A.R.)"]["notify"] = "";
	$fieldLabelscommercial_invoices["Chinese (Hong Kong S.A.R.)"]["proforma_invoice_id"] = "Proforma Invoice Id";
	$fieldToolTipscommercial_invoices["Chinese (Hong Kong S.A.R.)"]["proforma_invoice_id"] = "";
	if (count($fieldToolTipscommercial_invoices["Chinese (Hong Kong S.A.R.)"])){
		$tdatacommercial_invoices[".isUseToolTips"]=true;
	}
}
if(mlang_getcurrentlang()=="Chinese (Taiwan)")
{
	$fieldLabelscommercial_invoices["Chinese (Taiwan)"]=array();
	$fieldToolTipscommercial_invoices["Chinese (Taiwan)"]=array();
	$fieldLabelscommercial_invoices["Chinese (Taiwan)"]["id"] = "Id";
	$fieldToolTipscommercial_invoices["Chinese (Taiwan)"]["id"] = "";
	$fieldLabelscommercial_invoices["Chinese (Taiwan)"]["account_id"] = "Account Id";
	$fieldToolTipscommercial_invoices["Chinese (Taiwan)"]["account_id"] = "";
	$fieldLabelscommercial_invoices["Chinese (Taiwan)"]["buyer_id"] = "Buyer Id";
	$fieldToolTipscommercial_invoices["Chinese (Taiwan)"]["buyer_id"] = "";
	$fieldLabelscommercial_invoices["Chinese (Taiwan)"]["consignee_id"] = "Consignee Id";
	$fieldToolTipscommercial_invoices["Chinese (Taiwan)"]["consignee_id"] = "";
	$fieldLabelscommercial_invoices["Chinese (Taiwan)"]["notify_id"] = "Notify Id";
	$fieldToolTipscommercial_invoices["Chinese (Taiwan)"]["notify_id"] = "";
	$fieldLabelscommercial_invoices["Chinese (Taiwan)"]["commercial_invoice_no"] = "Invoice No";
	$fieldToolTipscommercial_invoices["Chinese (Taiwan)"]["commercial_invoice_no"] = "";
	$fieldLabelscommercial_invoices["Chinese (Taiwan)"]["commercial_invoice_date"] = "Invoice Date";
	$fieldToolTipscommercial_invoices["Chinese (Taiwan)"]["commercial_invoice_date"] = "";
	$fieldLabelscommercial_invoices["Chinese (Taiwan)"]["customer_purchase_order_no"] = "Customer PO No";
	$fieldToolTipscommercial_invoices["Chinese (Taiwan)"]["customer_purchase_order_no"] = "";
	$fieldLabelscommercial_invoices["Chinese (Taiwan)"]["bl_awb_no"] = "Bl Awb No";
	$fieldToolTipscommercial_invoices["Chinese (Taiwan)"]["bl_awb_no"] = "";
	$fieldLabelscommercial_invoices["Chinese (Taiwan)"]["country_id"] = "Country Id";
	$fieldToolTipscommercial_invoices["Chinese (Taiwan)"]["country_id"] = "";
	$fieldLabelscommercial_invoices["Chinese (Taiwan)"]["export_date"] = "Export Date";
	$fieldToolTipscommercial_invoices["Chinese (Taiwan)"]["export_date"] = "";
	$fieldLabelscommercial_invoices["Chinese (Taiwan)"]["payment_term"] = "Payment Term";
	$fieldToolTipscommercial_invoices["Chinese (Taiwan)"]["payment_term"] = "";
	$fieldLabelscommercial_invoices["Chinese (Taiwan)"]["export_references"] = "Export References";
	$fieldToolTipscommercial_invoices["Chinese (Taiwan)"]["export_references"] = "";
	$fieldLabelscommercial_invoices["Chinese (Taiwan)"]["export_route"] = "Export Route";
	$fieldToolTipscommercial_invoices["Chinese (Taiwan)"]["export_route"] = "";
	$fieldLabelscommercial_invoices["Chinese (Taiwan)"]["package_marks"] = "Package Marks";
	$fieldToolTipscommercial_invoices["Chinese (Taiwan)"]["package_marks"] = "";
	$fieldLabelscommercial_invoices["Chinese (Taiwan)"]["misc_charges"] = "Misc Charges";
	$fieldToolTipscommercial_invoices["Chinese (Taiwan)"]["misc_charges"] = "";
	$fieldLabelscommercial_invoices["Chinese (Taiwan)"]["certifications"] = "Certifications";
	$fieldToolTipscommercial_invoices["Chinese (Taiwan)"]["certifications"] = "";
	$fieldLabelscommercial_invoices["Chinese (Taiwan)"]["account_name"] = "Account Name";
	$fieldToolTipscommercial_invoices["Chinese (Taiwan)"]["account_name"] = "";
	$fieldLabelscommercial_invoices["Chinese (Taiwan)"]["buyer"] = "Buyer";
	$fieldToolTipscommercial_invoices["Chinese (Taiwan)"]["buyer"] = "";
	$fieldLabelscommercial_invoices["Chinese (Taiwan)"]["consignee"] = "Consignee";
	$fieldToolTipscommercial_invoices["Chinese (Taiwan)"]["consignee"] = "";
	$fieldLabelscommercial_invoices["Chinese (Taiwan)"]["notify"] = "Notify";
	$fieldToolTipscommercial_invoices["Chinese (Taiwan)"]["notify"] = "";
	$fieldLabelscommercial_invoices["Chinese (Taiwan)"]["proforma_invoice_id"] = "Proforma Invoice Id";
	$fieldToolTipscommercial_invoices["Chinese (Taiwan)"]["proforma_invoice_id"] = "";
	if (count($fieldToolTipscommercial_invoices["Chinese (Taiwan)"])){
		$tdatacommercial_invoices[".isUseToolTips"]=true;
	}
}
if(mlang_getcurrentlang()=="French")
{
	$fieldLabelscommercial_invoices["French"]=array();
	$fieldToolTipscommercial_invoices["French"]=array();
	$fieldLabelscommercial_invoices["French"]["id"] = "Id";
	$fieldToolTipscommercial_invoices["French"]["id"] = "";
	$fieldLabelscommercial_invoices["French"]["account_id"] = "Account Id";
	$fieldToolTipscommercial_invoices["French"]["account_id"] = "";
	$fieldLabelscommercial_invoices["French"]["buyer_id"] = "Buyer Id";
	$fieldToolTipscommercial_invoices["French"]["buyer_id"] = "";
	$fieldLabelscommercial_invoices["French"]["consignee_id"] = "Consignee Id";
	$fieldToolTipscommercial_invoices["French"]["consignee_id"] = "";
	$fieldLabelscommercial_invoices["French"]["notify_id"] = "Notify Id";
	$fieldToolTipscommercial_invoices["French"]["notify_id"] = "";
	$fieldLabelscommercial_invoices["French"]["commercial_invoice_no"] = "Commercial Invoice No";
	$fieldToolTipscommercial_invoices["French"]["commercial_invoice_no"] = "";
	$fieldLabelscommercial_invoices["French"]["commercial_invoice_date"] = "Commercial Invoice Date";
	$fieldToolTipscommercial_invoices["French"]["commercial_invoice_date"] = "";
	$fieldLabelscommercial_invoices["French"]["customer_purchase_order_no"] = "Customer Purchase Order No";
	$fieldToolTipscommercial_invoices["French"]["customer_purchase_order_no"] = "";
	$fieldLabelscommercial_invoices["French"]["bl_awb_no"] = "Bl Awb No";
	$fieldToolTipscommercial_invoices["French"]["bl_awb_no"] = "";
	$fieldLabelscommercial_invoices["French"]["country_id"] = "Country Id";
	$fieldToolTipscommercial_invoices["French"]["country_id"] = "";
	$fieldLabelscommercial_invoices["French"]["export_date"] = "Export Date";
	$fieldToolTipscommercial_invoices["French"]["export_date"] = "";
	$fieldLabelscommercial_invoices["French"]["payment_term"] = "Payment Term";
	$fieldToolTipscommercial_invoices["French"]["payment_term"] = "";
	$fieldLabelscommercial_invoices["French"]["export_references"] = "Export References";
	$fieldToolTipscommercial_invoices["French"]["export_references"] = "";
	$fieldLabelscommercial_invoices["French"]["export_route"] = "Export Route";
	$fieldToolTipscommercial_invoices["French"]["export_route"] = "";
	$fieldLabelscommercial_invoices["French"]["package_marks"] = "Package Marks";
	$fieldToolTipscommercial_invoices["French"]["package_marks"] = "";
	$fieldLabelscommercial_invoices["French"]["misc_charges"] = "Misc Charges";
	$fieldToolTipscommercial_invoices["French"]["misc_charges"] = "";
	$fieldLabelscommercial_invoices["French"]["certifications"] = "Certifications";
	$fieldToolTipscommercial_invoices["French"]["certifications"] = "";
	$fieldLabelscommercial_invoices["French"]["account_name"] = "Account Name";
	$fieldToolTipscommercial_invoices["French"]["account_name"] = "";
	$fieldLabelscommercial_invoices["French"]["buyer"] = "Buyer";
	$fieldToolTipscommercial_invoices["French"]["buyer"] = "";
	$fieldLabelscommercial_invoices["French"]["consignee"] = "Consignee";
	$fieldToolTipscommercial_invoices["French"]["consignee"] = "";
	$fieldLabelscommercial_invoices["French"]["notify"] = "Notify";
	$fieldToolTipscommercial_invoices["French"]["notify"] = "";
	$fieldLabelscommercial_invoices["French"]["proforma_invoice_id"] = "Proforma Invoice Id";
	$fieldToolTipscommercial_invoices["French"]["proforma_invoice_id"] = "";
	if (count($fieldToolTipscommercial_invoices["French"])){
		$tdatacommercial_invoices[".isUseToolTips"]=true;
	}
}


	
	$tdatacommercial_invoices[".NCSearch"]=true;

	

$tdatacommercial_invoices[".shortTableName"] = "commercial_invoices";
$tdatacommercial_invoices[".nSecOptions"] = 0;
$tdatacommercial_invoices[".recsPerRowList"] = 1;	
$tdatacommercial_invoices[".tableGroupBy"] = "0";
$tdatacommercial_invoices[".mainTableOwnerID"] = "";
$tdatacommercial_invoices[".moveNext"] = 1;




$tdatacommercial_invoices[".showAddInPopup"] = false;

$tdatacommercial_invoices[".showEditInPopup"] = false;

$tdatacommercial_invoices[".showViewInPopup"] = false;


$tdatacommercial_invoices[".fieldsForRegister"] = array();

$tdatacommercial_invoices[".listAjax"] = true;

	$tdatacommercial_invoices[".audit"] = false;

	$tdatacommercial_invoices[".locking"] = false;
	
$tdatacommercial_invoices[".listIcons"] = true;
$tdatacommercial_invoices[".edit"] = true;
$tdatacommercial_invoices[".inlineEdit"] = true;
$tdatacommercial_invoices[".copy"] = true;
$tdatacommercial_invoices[".view"] = true;

$tdatacommercial_invoices[".exportTo"] = true;

$tdatacommercial_invoices[".printFriendly"] = true;

$tdatacommercial_invoices[".delete"] = true;

$tdatacommercial_invoices[".showSimpleSearchOptions"] = true;

$tdatacommercial_invoices[".showSearchPanel"] = true;


$tdatacommercial_invoices[".isUseAjaxSuggest"] = true;

$tdatacommercial_invoices[".rowHighlite"] = true;


// button handlers file names

$tdatacommercial_invoices[".addPageEvents"] = true;

$tdatacommercial_invoices[".arrKeyFields"][] = "id";

// use datepicker for search panel
$tdatacommercial_invoices[".isUseCalendarForSearch"] = true;

// use timepicker for search panel
$tdatacommercial_invoices[".isUseTimeForSearch"] = false;

$tdatacommercial_invoices[".isUseiBox"] = false;


$tdatacommercial_invoices[".useDetailsPreview"] = true;	

$tdatacommercial_invoices[".isUseInlineAdd"] = true;

$tdatacommercial_invoices[".isUseInlineEdit"] = true;
$tdatacommercial_invoices[".isUseInlineJs"] = $tdatacommercial_invoices[".isUseInlineAdd"] || $tdatacommercial_invoices[".isUseInlineEdit"];

$tdatacommercial_invoices[".allSearchFields"] = array();

$tdatacommercial_invoices[".globSearchFields"][] = "id";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("id", $tdatacommercial_invoices[".allSearchFields"]))
{
	$tdatacommercial_invoices[".allSearchFields"][] = "id";	
}
$tdatacommercial_invoices[".globSearchFields"][] = "proforma_invoice_id";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("proforma_invoice_id", $tdatacommercial_invoices[".allSearchFields"]))
{
	$tdatacommercial_invoices[".allSearchFields"][] = "proforma_invoice_id";	
}
$tdatacommercial_invoices[".globSearchFields"][] = "account_id";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("account_id", $tdatacommercial_invoices[".allSearchFields"]))
{
	$tdatacommercial_invoices[".allSearchFields"][] = "account_id";	
}
$tdatacommercial_invoices[".globSearchFields"][] = "account_name";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("account_name", $tdatacommercial_invoices[".allSearchFields"]))
{
	$tdatacommercial_invoices[".allSearchFields"][] = "account_name";	
}
$tdatacommercial_invoices[".globSearchFields"][] = "buyer_id";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("buyer_id", $tdatacommercial_invoices[".allSearchFields"]))
{
	$tdatacommercial_invoices[".allSearchFields"][] = "buyer_id";	
}
$tdatacommercial_invoices[".globSearchFields"][] = "buyer";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("buyer", $tdatacommercial_invoices[".allSearchFields"]))
{
	$tdatacommercial_invoices[".allSearchFields"][] = "buyer";	
}
$tdatacommercial_invoices[".globSearchFields"][] = "consignee_id";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("consignee_id", $tdatacommercial_invoices[".allSearchFields"]))
{
	$tdatacommercial_invoices[".allSearchFields"][] = "consignee_id";	
}
$tdatacommercial_invoices[".globSearchFields"][] = "consignee";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("consignee", $tdatacommercial_invoices[".allSearchFields"]))
{
	$tdatacommercial_invoices[".allSearchFields"][] = "consignee";	
}
$tdatacommercial_invoices[".globSearchFields"][] = "notify_id";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("notify_id", $tdatacommercial_invoices[".allSearchFields"]))
{
	$tdatacommercial_invoices[".allSearchFields"][] = "notify_id";	
}
$tdatacommercial_invoices[".globSearchFields"][] = "notify";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("notify", $tdatacommercial_invoices[".allSearchFields"]))
{
	$tdatacommercial_invoices[".allSearchFields"][] = "notify";	
}
$tdatacommercial_invoices[".globSearchFields"][] = "commercial_invoice_no";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("commercial_invoice_no", $tdatacommercial_invoices[".allSearchFields"]))
{
	$tdatacommercial_invoices[".allSearchFields"][] = "commercial_invoice_no";	
}
$tdatacommercial_invoices[".globSearchFields"][] = "commercial_invoice_date";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("commercial_invoice_date", $tdatacommercial_invoices[".allSearchFields"]))
{
	$tdatacommercial_invoices[".allSearchFields"][] = "commercial_invoice_date";	
}
$tdatacommercial_invoices[".globSearchFields"][] = "customer_purchase_order_no";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("customer_purchase_order_no", $tdatacommercial_invoices[".allSearchFields"]))
{
	$tdatacommercial_invoices[".allSearchFields"][] = "customer_purchase_order_no";	
}
$tdatacommercial_invoices[".globSearchFields"][] = "bl_awb_no";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("bl_awb_no", $tdatacommercial_invoices[".allSearchFields"]))
{
	$tdatacommercial_invoices[".allSearchFields"][] = "bl_awb_no";	
}
$tdatacommercial_invoices[".globSearchFields"][] = "country_id";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("country_id", $tdatacommercial_invoices[".allSearchFields"]))
{
	$tdatacommercial_invoices[".allSearchFields"][] = "country_id";	
}
$tdatacommercial_invoices[".globSearchFields"][] = "export_date";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("export_date", $tdatacommercial_invoices[".allSearchFields"]))
{
	$tdatacommercial_invoices[".allSearchFields"][] = "export_date";	
}
$tdatacommercial_invoices[".globSearchFields"][] = "payment_term";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("payment_term", $tdatacommercial_invoices[".allSearchFields"]))
{
	$tdatacommercial_invoices[".allSearchFields"][] = "payment_term";	
}
$tdatacommercial_invoices[".globSearchFields"][] = "export_references";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("export_references", $tdatacommercial_invoices[".allSearchFields"]))
{
	$tdatacommercial_invoices[".allSearchFields"][] = "export_references";	
}
$tdatacommercial_invoices[".globSearchFields"][] = "export_route";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("export_route", $tdatacommercial_invoices[".allSearchFields"]))
{
	$tdatacommercial_invoices[".allSearchFields"][] = "export_route";	
}
$tdatacommercial_invoices[".globSearchFields"][] = "package_marks";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("package_marks", $tdatacommercial_invoices[".allSearchFields"]))
{
	$tdatacommercial_invoices[".allSearchFields"][] = "package_marks";	
}
$tdatacommercial_invoices[".globSearchFields"][] = "misc_charges";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("misc_charges", $tdatacommercial_invoices[".allSearchFields"]))
{
	$tdatacommercial_invoices[".allSearchFields"][] = "misc_charges";	
}
$tdatacommercial_invoices[".globSearchFields"][] = "certifications";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("certifications", $tdatacommercial_invoices[".allSearchFields"]))
{
	$tdatacommercial_invoices[".allSearchFields"][] = "certifications";	
}


$tdatacommercial_invoices[".googleLikeFields"][] = "id";
$tdatacommercial_invoices[".googleLikeFields"][] = "proforma_invoice_id";
$tdatacommercial_invoices[".googleLikeFields"][] = "account_id";
$tdatacommercial_invoices[".googleLikeFields"][] = "account_name";
$tdatacommercial_invoices[".googleLikeFields"][] = "buyer_id";
$tdatacommercial_invoices[".googleLikeFields"][] = "buyer";
$tdatacommercial_invoices[".googleLikeFields"][] = "consignee_id";
$tdatacommercial_invoices[".googleLikeFields"][] = "consignee";
$tdatacommercial_invoices[".googleLikeFields"][] = "notify_id";
$tdatacommercial_invoices[".googleLikeFields"][] = "notify";
$tdatacommercial_invoices[".googleLikeFields"][] = "commercial_invoice_no";
$tdatacommercial_invoices[".googleLikeFields"][] = "commercial_invoice_date";
$tdatacommercial_invoices[".googleLikeFields"][] = "customer_purchase_order_no";
$tdatacommercial_invoices[".googleLikeFields"][] = "bl_awb_no";
$tdatacommercial_invoices[".googleLikeFields"][] = "country_id";
$tdatacommercial_invoices[".googleLikeFields"][] = "export_date";
$tdatacommercial_invoices[".googleLikeFields"][] = "payment_term";
$tdatacommercial_invoices[".googleLikeFields"][] = "export_references";
$tdatacommercial_invoices[".googleLikeFields"][] = "export_route";
$tdatacommercial_invoices[".googleLikeFields"][] = "package_marks";
$tdatacommercial_invoices[".googleLikeFields"][] = "misc_charges";
$tdatacommercial_invoices[".googleLikeFields"][] = "certifications";



$tdatacommercial_invoices[".advSearchFields"][] = "id";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("id", $tdatacommercial_invoices[".allSearchFields"])) 
{
	$tdatacommercial_invoices[".allSearchFields"][] = "id";	
}
$tdatacommercial_invoices[".advSearchFields"][] = "proforma_invoice_id";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("proforma_invoice_id", $tdatacommercial_invoices[".allSearchFields"])) 
{
	$tdatacommercial_invoices[".allSearchFields"][] = "proforma_invoice_id";	
}
$tdatacommercial_invoices[".advSearchFields"][] = "account_id";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("account_id", $tdatacommercial_invoices[".allSearchFields"])) 
{
	$tdatacommercial_invoices[".allSearchFields"][] = "account_id";	
}
$tdatacommercial_invoices[".advSearchFields"][] = "account_name";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("account_name", $tdatacommercial_invoices[".allSearchFields"])) 
{
	$tdatacommercial_invoices[".allSearchFields"][] = "account_name";	
}
$tdatacommercial_invoices[".advSearchFields"][] = "buyer_id";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("buyer_id", $tdatacommercial_invoices[".allSearchFields"])) 
{
	$tdatacommercial_invoices[".allSearchFields"][] = "buyer_id";	
}
$tdatacommercial_invoices[".advSearchFields"][] = "buyer";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("buyer", $tdatacommercial_invoices[".allSearchFields"])) 
{
	$tdatacommercial_invoices[".allSearchFields"][] = "buyer";	
}
$tdatacommercial_invoices[".advSearchFields"][] = "consignee_id";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("consignee_id", $tdatacommercial_invoices[".allSearchFields"])) 
{
	$tdatacommercial_invoices[".allSearchFields"][] = "consignee_id";	
}
$tdatacommercial_invoices[".advSearchFields"][] = "consignee";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("consignee", $tdatacommercial_invoices[".allSearchFields"])) 
{
	$tdatacommercial_invoices[".allSearchFields"][] = "consignee";	
}
$tdatacommercial_invoices[".advSearchFields"][] = "notify_id";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("notify_id", $tdatacommercial_invoices[".allSearchFields"])) 
{
	$tdatacommercial_invoices[".allSearchFields"][] = "notify_id";	
}
$tdatacommercial_invoices[".advSearchFields"][] = "notify";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("notify", $tdatacommercial_invoices[".allSearchFields"])) 
{
	$tdatacommercial_invoices[".allSearchFields"][] = "notify";	
}
$tdatacommercial_invoices[".advSearchFields"][] = "commercial_invoice_no";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("commercial_invoice_no", $tdatacommercial_invoices[".allSearchFields"])) 
{
	$tdatacommercial_invoices[".allSearchFields"][] = "commercial_invoice_no";	
}
$tdatacommercial_invoices[".advSearchFields"][] = "commercial_invoice_date";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("commercial_invoice_date", $tdatacommercial_invoices[".allSearchFields"])) 
{
	$tdatacommercial_invoices[".allSearchFields"][] = "commercial_invoice_date";	
}
$tdatacommercial_invoices[".advSearchFields"][] = "customer_purchase_order_no";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("customer_purchase_order_no", $tdatacommercial_invoices[".allSearchFields"])) 
{
	$tdatacommercial_invoices[".allSearchFields"][] = "customer_purchase_order_no";	
}
$tdatacommercial_invoices[".advSearchFields"][] = "bl_awb_no";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("bl_awb_no", $tdatacommercial_invoices[".allSearchFields"])) 
{
	$tdatacommercial_invoices[".allSearchFields"][] = "bl_awb_no";	
}
$tdatacommercial_invoices[".advSearchFields"][] = "country_id";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("country_id", $tdatacommercial_invoices[".allSearchFields"])) 
{
	$tdatacommercial_invoices[".allSearchFields"][] = "country_id";	
}
$tdatacommercial_invoices[".advSearchFields"][] = "export_date";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("export_date", $tdatacommercial_invoices[".allSearchFields"])) 
{
	$tdatacommercial_invoices[".allSearchFields"][] = "export_date";	
}
$tdatacommercial_invoices[".advSearchFields"][] = "payment_term";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("payment_term", $tdatacommercial_invoices[".allSearchFields"])) 
{
	$tdatacommercial_invoices[".allSearchFields"][] = "payment_term";	
}
$tdatacommercial_invoices[".advSearchFields"][] = "export_references";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("export_references", $tdatacommercial_invoices[".allSearchFields"])) 
{
	$tdatacommercial_invoices[".allSearchFields"][] = "export_references";	
}
$tdatacommercial_invoices[".advSearchFields"][] = "export_route";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("export_route", $tdatacommercial_invoices[".allSearchFields"])) 
{
	$tdatacommercial_invoices[".allSearchFields"][] = "export_route";	
}
$tdatacommercial_invoices[".advSearchFields"][] = "package_marks";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("package_marks", $tdatacommercial_invoices[".allSearchFields"])) 
{
	$tdatacommercial_invoices[".allSearchFields"][] = "package_marks";	
}
$tdatacommercial_invoices[".advSearchFields"][] = "misc_charges";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("misc_charges", $tdatacommercial_invoices[".allSearchFields"])) 
{
	$tdatacommercial_invoices[".allSearchFields"][] = "misc_charges";	
}
$tdatacommercial_invoices[".advSearchFields"][] = "certifications";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("certifications", $tdatacommercial_invoices[".allSearchFields"])) 
{
	$tdatacommercial_invoices[".allSearchFields"][] = "certifications";	
}

$tdatacommercial_invoices[".isTableType"] = "list";


	

$tdatacommercial_invoices[".isDisplayLoading"] = true;

$tdatacommercial_invoices[".isResizeColumns"] = false;

	$tdatacommercial_invoices[".subQueriesSupAccess"] = true;




$tdatacommercial_invoices[".pageSize"] = 20;

$gstrOrderBy = "";
if(strlen($gstrOrderBy) && strtolower(substr($gstrOrderBy,0,8))!="order by")
	$gstrOrderBy = "order by ".$gstrOrderBy;
$tdatacommercial_invoices[".strOrderBy"] = $gstrOrderBy;
	
$tdatacommercial_invoices[".orderindexes"] = array();

$tdatacommercial_invoices[".sqlHead"] = "SELECT id,  account_id,  buyer_id,  consignee_id,  notify_id,  commercial_invoice_no,  commercial_invoice_date,  customer_purchase_order_no,  bl_awb_no,  country_id,  export_date,  payment_term,  export_references,  export_route,  package_marks,  misc_charges,  certifications,  \"\" AS account_name,  \"\" AS buyer,  \"\" AS consignee,  \"\" AS notify,  proforma_invoice_id";
$tdatacommercial_invoices[".sqlFrom"] = "FROM commercial_invoices";
$tdatacommercial_invoices[".sqlWhereExpr"] = "";
$tdatacommercial_invoices[".sqlTail"] = "";

//fill array of tabs for edit page
$arrEditTabs = array();
	$tabFields = array();
	$tabFields[]="proforma_invoice_id";
$arrEditTabs[] = array('tabId'=>'proforma1',
					   'tabName'=>"proforma",
					   'nType'=>'1',
					   'nOrder'=>1,
					   'tabGroup'=>0,
					   'arrFields'=> $tabFields,
					   'expandSec'=>1);
	$tabFields = array();
	$tabFields[]="account_id";
	$tabFields[]="account_name";
	$tabFields[]="buyer_id";
	$tabFields[]="buyer";
	$tabFields[]="consignee_id";
	$tabFields[]="consignee";
	$tabFields[]="notify_id";
	$tabFields[]="notify";
$arrEditTabs[] = array('tabId'=>'Companies1',
					   'tabName'=>"Companies",
					   'nType'=>'1',
					   'nOrder'=>3,
					   'tabGroup'=>0,
					   'arrFields'=> $tabFields,
					   'expandSec'=>1);
	$tabFields = array();
	$tabFields[]="commercial_invoice_no";
	$tabFields[]="commercial_invoice_date";
	$tabFields[]="customer_purchase_order_no";
	$tabFields[]="bl_awb_no";
	$tabFields[]="country_id";
	$tabFields[]="export_date";
	$tabFields[]="payment_term";
	$tabFields[]="export_references";
	$tabFields[]="export_route";
	$tabFields[]="package_marks";
	$tabFields[]="misc_charges";
	$tabFields[]="certifications";
$arrEditTabs[] = array('tabId'=>'Commercials1',
					   'tabName'=>"Commercials",
					   'nType'=>'1',
					   'nOrder'=>12,
					   'tabGroup'=>0,
					   'arrFields'=> $tabFields,
					   'expandSec'=>1);
$tdatacommercial_invoices[".arrEditTabs"] = $arrEditTabs;

//fill array of tabs for add page
$arrAddTabs = array();
	$tabFields = array();
	$tabFields[] = "proforma_invoice_id";
$arrAddTabs[] = array('tabId'=>'proforma1',
					  'tabName'=>"proforma",
					  'nType'=>'1',
					  'nOrder'=>1,
					  'tabGroup'=>0,
					  'arrFields'=> $tabFields,
					  'expandSec'=>1);
	$tabFields = array();
	$tabFields[] = "account_id";
	$tabFields[] = "account_name";
	$tabFields[] = "buyer_id";
	$tabFields[] = "buyer";
	$tabFields[] = "consignee_id";
	$tabFields[] = "consignee";
	$tabFields[] = "notify_id";
	$tabFields[] = "notify";
$arrAddTabs[] = array('tabId'=>'Companies1',
					  'tabName'=>"Companies",
					  'nType'=>'1',
					  'nOrder'=>3,
					  'tabGroup'=>0,
					  'arrFields'=> $tabFields,
					  'expandSec'=>1);
	$tabFields = array();
	$tabFields[] = "commercial_invoice_no";
	$tabFields[] = "commercial_invoice_date";
	$tabFields[] = "customer_purchase_order_no";
	$tabFields[] = "bl_awb_no";
	$tabFields[] = "country_id";
	$tabFields[] = "export_date";
	$tabFields[] = "payment_term";
	$tabFields[] = "export_references";
	$tabFields[] = "export_route";
	$tabFields[] = "package_marks";
	$tabFields[] = "misc_charges";
	$tabFields[] = "certifications";
$arrAddTabs[] = array('tabId'=>'Commercials1',
					  'tabName'=>"Commercials",
					  'nType'=>'1',
					  'nOrder'=>12,
					  'tabGroup'=>0,
					  'arrFields'=> $tabFields,
					  'expandSec'=>1);
$tdatacommercial_invoices[".arrAddTabs"] = $arrAddTabs;

//fill array of tabs for view page
$arrViewTabs = array();
	$tabFields = array();
	$tabFields[] = "proforma_invoice_id";
$arrViewTabs[] = array('tabId'=>'proforma1',
					   'tabName'=>"proforma",
					   'nType'=>'1',
					   'nOrder'=>1,
					   'tabGroup'=>0,
					   'arrFields'=> $tabFields,
					   'expandSec'=>1);
	$tabFields = array();
	$tabFields[] = "account_id";
	$tabFields[] = "account_name";
	$tabFields[] = "buyer_id";
	$tabFields[] = "buyer";
	$tabFields[] = "consignee_id";
	$tabFields[] = "consignee";
	$tabFields[] = "notify_id";
	$tabFields[] = "notify";
$arrViewTabs[] = array('tabId'=>'Companies1',
					   'tabName'=>"Companies",
					   'nType'=>'1',
					   'nOrder'=>3,
					   'tabGroup'=>0,
					   'arrFields'=> $tabFields,
					   'expandSec'=>1);
	$tabFields = array();
	$tabFields[] = "commercial_invoice_no";
	$tabFields[] = "commercial_invoice_date";
	$tabFields[] = "customer_purchase_order_no";
	$tabFields[] = "bl_awb_no";
	$tabFields[] = "country_id";
	$tabFields[] = "export_date";
	$tabFields[] = "payment_term";
	$tabFields[] = "export_references";
	$tabFields[] = "export_route";
	$tabFields[] = "package_marks";
	$tabFields[] = "misc_charges";
	$tabFields[] = "certifications";
$arrViewTabs[] = array('tabId'=>'Commercials1',
					   'tabName'=>"Commercials",
					   'nType'=>'1',
					   'nOrder'=>12,
					   'tabGroup'=>0,
					   'arrFields'=> $tabFields,
					   'expandSec'=>1);
$tdatacommercial_invoices[".arrViewTabs"] = $arrViewTabs;

//fill array of records per page for list and report without group fields
$arrRPP = array();
$arrRPP[] = 10;
$arrRPP[] = 20;
$arrRPP[] = 30;
$arrRPP[] = 50;
$arrRPP[] = 100;
$arrRPP[] = 500;
$arrRPP[] = -1;
$tdatacommercial_invoices[".arrRecsPerPage"] = $arrRPP;

//fill array of groups per page for report with group fields
$arrGPP = array();
$arrGPP[] = 1;
$arrGPP[] = 3;
$arrGPP[] = 5;
$arrGPP[] = 10;
$arrGPP[] = 50;
$arrGPP[] = 100;
$arrGPP[] = -1;
$tdatacommercial_invoices[".arrGroupsPerPage"] = $arrGPP;

	$tableKeys = array();
	$tableKeys[] = "id";
	$tdatacommercial_invoices[".Keys"] = $tableKeys;

//	id
	$fdata = array();
	$fdata["strName"] = "id";
	$fdata["ownerTable"] = "commercial_invoices";
		$fdata["Label"]="Id"; 
	
		
		
	$fdata["FieldType"]= 3;
	
		$fdata["AutoInc"]=true;
	
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "id";
	
		$fdata["FullName"]= "id";
	
		$fdata["IsRequired"]=true; 
	
		
		
		
		
				$fdata["Index"]= 1;
				$fdata["EditParams"]="";
			
		$fdata["bListPage"]=true; 
	
		
		
		
		
		
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
				$fdata["validateAs"]["basicValidate"][] = getJsValidatorName("Number");	
						$fdata["validateAs"]["basicValidate"][] = "IsRequired";
	
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatacommercial_invoices["id"]=$fdata;
//	account_id
	$fdata = array();
	$fdata["strName"] = "account_id";
	$fdata["ownerTable"] = "commercial_invoices";
		$fdata["Label"]="Account"; 
	
		
		
	$fdata["FieldType"]= 3;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Lookup wizard";
	$fdata["ViewFormat"]= "";
	
		
		$fdata["LookupType"]=1;
	$fdata["pLookupType"] = 1;
	$fdata["freeInput"] = 0;	
	$fdata["autoCompleteFieldsOnEdit"] = 1;
	$fdata["autoCompleteFields"] = array();
	$fdata["autoCompleteFields"][] = array('masterF'=>"account_name", 'lookupF'=>"full_addr");
										$fdata["LinkField"]="id";
	$fdata["LinkFieldType"]=3;
	$fdata["DisplayField"]="company_name";
				$fdata["LookupTable"]="company_addresses";
	$fdata["LookupOrderBy"]="company_name";
							$fdata["LookupWhere"] = "category='Account'";
										$fdata["AllowToAdd"]=true; 
				
					
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "account_id";
	
		$fdata["FullName"]= "account_id";
	
		$fdata["IsRequired"]=true; 
	
		
		
		
		
				$fdata["Index"]= 2;
				
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
						$fdata["validateAs"]["basicValidate"][] = "IsRequired";
	
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatacommercial_invoices["account_id"]=$fdata;
//	buyer_id
	$fdata = array();
	$fdata["strName"] = "buyer_id";
	$fdata["ownerTable"] = "commercial_invoices";
		$fdata["Label"]="Buyer"; 
	
		
		
	$fdata["FieldType"]= 3;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Lookup wizard";
	$fdata["ViewFormat"]= "";
	
		
		$fdata["LookupType"]=1;
	$fdata["pLookupType"] = 1;
	$fdata["freeInput"] = 0;	
	$fdata["autoCompleteFieldsOnEdit"] = 0;
	$fdata["autoCompleteFields"] = array();
	$fdata["autoCompleteFields"][] = array('masterF'=>"buyer", 'lookupF'=>"full_addr");
										$fdata["LinkField"]="id";
	$fdata["LinkFieldType"]=3;
	$fdata["DisplayField"]="company_name";
				$fdata["LookupTable"]="company_addresses";
	$fdata["LookupOrderBy"]="company_name";
							$fdata["LookupWhere"] = "category='Buyer'";
										$fdata["AllowToAdd"]=true; 
				
					
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "buyer_id";
	
		$fdata["FullName"]= "buyer_id";
	
		$fdata["IsRequired"]=true; 
	
		
		
		
		
				$fdata["Index"]= 3;
				
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
						$fdata["validateAs"]["basicValidate"][] = "IsRequired";
	
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatacommercial_invoices["buyer_id"]=$fdata;
//	consignee_id
	$fdata = array();
	$fdata["strName"] = "consignee_id";
	$fdata["ownerTable"] = "commercial_invoices";
		$fdata["Label"]="Consignee"; 
	
		
		
	$fdata["FieldType"]= 3;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Lookup wizard";
	$fdata["ViewFormat"]= "";
	
		
		$fdata["LookupType"]=1;
	$fdata["pLookupType"] = 1;
	$fdata["freeInput"] = 0;	
	$fdata["autoCompleteFieldsOnEdit"] = 0;
	$fdata["autoCompleteFields"] = array();
	$fdata["autoCompleteFields"][] = array('masterF'=>"consignee", 'lookupF'=>"full_addr");
										$fdata["LinkField"]="id";
	$fdata["LinkFieldType"]=3;
	$fdata["DisplayField"]="company_name";
				$fdata["LookupTable"]="company_addresses";
	$fdata["LookupOrderBy"]="company_name";
							$fdata["LookupWhere"] = "category='Buyer'";
										$fdata["AllowToAdd"]=true; 
				
					
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "consignee_id";
	
		$fdata["FullName"]= "consignee_id";
	
		
		
		
		
		
				$fdata["Index"]= 4;
				
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
						
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatacommercial_invoices["consignee_id"]=$fdata;
//	notify_id
	$fdata = array();
	$fdata["strName"] = "notify_id";
	$fdata["ownerTable"] = "commercial_invoices";
		$fdata["Label"]="Notify"; 
	
		
		
	$fdata["FieldType"]= 3;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Lookup wizard";
	$fdata["ViewFormat"]= "";
	
		
		$fdata["LookupType"]=1;
	$fdata["pLookupType"] = 1;
	$fdata["freeInput"] = 0;	
	$fdata["autoCompleteFieldsOnEdit"] = 0;
	$fdata["autoCompleteFields"] = array();
	$fdata["autoCompleteFields"][] = array('masterF'=>"notify", 'lookupF'=>"full_addr");
										$fdata["LinkField"]="id";
	$fdata["LinkFieldType"]=3;
	$fdata["DisplayField"]="company_name";
				$fdata["LookupTable"]="company_addresses";
	$fdata["LookupOrderBy"]="company_name";
							$fdata["LookupWhere"] = "category='Buyer'";
										$fdata["AllowToAdd"]=true; 
				
					
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "notify_id";
	
		$fdata["FullName"]= "notify_id";
	
		
		
		
		
		
				$fdata["Index"]= 5;
				
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
						
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatacommercial_invoices["notify_id"]=$fdata;
//	commercial_invoice_no
	$fdata = array();
	$fdata["strName"] = "commercial_invoice_no";
	$fdata["ownerTable"] = "commercial_invoices";
		$fdata["Label"]="Invoice No"; 
	
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "commercial_invoice_no";
	
		$fdata["FullName"]= "commercial_invoice_no";
	
		
		
		
		
		
				$fdata["Index"]= 6;
				$fdata["EditParams"]="";
			$fdata["EditParams"].= " maxlength=45";
		
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatacommercial_invoices["commercial_invoice_no"]=$fdata;
//	commercial_invoice_date
	$fdata = array();
	$fdata["strName"] = "commercial_invoice_date";
	$fdata["ownerTable"] = "commercial_invoices";
		$fdata["Label"]="Invoice Date"; 
	
		
		
	$fdata["FieldType"]= 7;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Date";
	$fdata["ViewFormat"]= "Short Date";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "commercial_invoice_date";
	
		$fdata["FullName"]= "commercial_invoice_date";
	
		$fdata["IsRequired"]=true; 
	
		
		
		
		
				$fdata["Index"]= 7;
		$fdata["DateEditType"] = 13; 
	$fdata["InitialYearFactor"] = 100; 
	$fdata["LastYearFactor"] = 10; 
			
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
						$fdata["validateAs"]["basicValidate"][] = "IsRequired";
	
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatacommercial_invoices["commercial_invoice_date"]=$fdata;
//	customer_purchase_order_no
	$fdata = array();
	$fdata["strName"] = "customer_purchase_order_no";
	$fdata["ownerTable"] = "commercial_invoices";
		$fdata["Label"]="Customer PO No"; 
	
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "customer_purchase_order_no";
	
		$fdata["FullName"]= "customer_purchase_order_no";
	
		
		
		
		
		
				$fdata["Index"]= 8;
				$fdata["EditParams"]="";
			$fdata["EditParams"].= " maxlength=45";
		
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatacommercial_invoices["customer_purchase_order_no"]=$fdata;
//	bl_awb_no
	$fdata = array();
	$fdata["strName"] = "bl_awb_no";
	$fdata["ownerTable"] = "commercial_invoices";
		$fdata["Label"]="BL/ AWB No"; 
	
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "bl_awb_no";
	
		$fdata["FullName"]= "bl_awb_no";
	
		
		
		
		
		
				$fdata["Index"]= 9;
				$fdata["EditParams"]="";
			$fdata["EditParams"].= " maxlength=45";
		
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatacommercial_invoices["bl_awb_no"]=$fdata;
//	country_id
	$fdata = array();
	$fdata["strName"] = "country_id";
	$fdata["ownerTable"] = "commercial_invoices";
		$fdata["Label"]="Country "; 
	
		
		
	$fdata["FieldType"]= 3;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Lookup wizard";
	$fdata["ViewFormat"]= "";
	
		
		$fdata["LookupType"]=1;
	$fdata["pLookupType"] = 1;
	$fdata["freeInput"] = 0;	
	$fdata["autoCompleteFieldsOnEdit"] = 0;
	$fdata["autoCompleteFields"] = array();
										$fdata["LinkField"]="id";
	$fdata["LinkFieldType"]=3;
	$fdata["DisplayField"]="country_name";
				$fdata["LookupTable"]="countries";
	$fdata["LookupOrderBy"]="country_name";
																$fdata["AllowToAdd"]=true; 
				
					
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "country_id";
	
		$fdata["FullName"]= "country_id";
	
		$fdata["IsRequired"]=true; 
	
		
		
		
		
				$fdata["Index"]= 10;
				
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
						$fdata["validateAs"]["basicValidate"][] = "IsRequired";
	
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatacommercial_invoices["country_id"]=$fdata;
//	export_date
	$fdata = array();
	$fdata["strName"] = "export_date";
	$fdata["ownerTable"] = "commercial_invoices";
		$fdata["Label"]="Export Date"; 
	
		
		
	$fdata["FieldType"]= 7;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Date";
	$fdata["ViewFormat"]= "Short Date";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "export_date";
	
		$fdata["FullName"]= "export_date";
	
		$fdata["IsRequired"]=true; 
	
		
		
		
		
				$fdata["Index"]= 11;
		$fdata["DateEditType"] = 13; 
	$fdata["InitialYearFactor"] = 100; 
	$fdata["LastYearFactor"] = 10; 
			
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
						$fdata["validateAs"]["basicValidate"][] = "IsRequired";
	
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatacommercial_invoices["export_date"]=$fdata;
//	payment_term
	$fdata = array();
	$fdata["strName"] = "payment_term";
	$fdata["ownerTable"] = "commercial_invoices";
		$fdata["Label"]="Payment Term"; 
	
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Lookup wizard";
	$fdata["ViewFormat"]= "";
	
		
		$fdata["LookupType"]=1;
	$fdata["pLookupType"] = 1;
	$fdata["freeInput"] = 0;	
	$fdata["autoCompleteFieldsOnEdit"] = 0;
	$fdata["autoCompleteFields"] = array();
										$fdata["LinkField"]="id";
	$fdata["LinkFieldType"]=3;
	$fdata["DisplayField"]="payment_term";
				$fdata["LookupTable"]="payment_terms";
	$fdata["LookupOrderBy"]="payment_term";
																$fdata["AllowToAdd"]=true; 
				
					
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "payment_term";
	
		$fdata["FullName"]= "payment_term";
	
		
		
		
		
		
				$fdata["Index"]= 12;
				
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatacommercial_invoices["payment_term"]=$fdata;
//	export_references
	$fdata = array();
	$fdata["strName"] = "export_references";
	$fdata["ownerTable"] = "commercial_invoices";
		$fdata["Label"]="Export References"; 
	
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "export_references";
	
		$fdata["FullName"]= "export_references";
	
		
		
		
		
		
				$fdata["Index"]= 13;
				$fdata["EditParams"]="";
			$fdata["EditParams"].= " maxlength=1000";
		
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatacommercial_invoices["export_references"]=$fdata;
//	export_route
	$fdata = array();
	$fdata["strName"] = "export_route";
	$fdata["ownerTable"] = "commercial_invoices";
		$fdata["Label"]="Export Route"; 
	
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "export_route";
	
		$fdata["FullName"]= "export_route";
	
		
		
		
		
		
				$fdata["Index"]= 14;
				$fdata["EditParams"]="";
			$fdata["EditParams"].= " maxlength=45";
		
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatacommercial_invoices["export_route"]=$fdata;
//	package_marks
	$fdata = array();
	$fdata["strName"] = "package_marks";
	$fdata["ownerTable"] = "commercial_invoices";
		$fdata["Label"]="Package Marks"; 
	
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "package_marks";
	
		$fdata["FullName"]= "package_marks";
	
		
		
		
		
		
				$fdata["Index"]= 15;
				$fdata["EditParams"]="";
			$fdata["EditParams"].= " maxlength=45";
		
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatacommercial_invoices["package_marks"]=$fdata;
//	misc_charges
	$fdata = array();
	$fdata["strName"] = "misc_charges";
	$fdata["ownerTable"] = "commercial_invoices";
		$fdata["Label"]="Misc Charges"; 
	
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "misc_charges";
	
		$fdata["FullName"]= "misc_charges";
	
		
		
		
		
		
				$fdata["Index"]= 16;
				$fdata["EditParams"]="";
			$fdata["EditParams"].= " maxlength=45";
		
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatacommercial_invoices["misc_charges"]=$fdata;
//	certifications
	$fdata = array();
	$fdata["strName"] = "certifications";
	$fdata["ownerTable"] = "commercial_invoices";
		$fdata["Label"]="Certifications"; 
	
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "certifications";
	
		$fdata["FullName"]= "certifications";
	
		
		
		
		
		
				$fdata["Index"]= 17;
				$fdata["EditParams"]="";
			$fdata["EditParams"].= " maxlength=45";
		
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatacommercial_invoices["certifications"]=$fdata;
//	account_name
	$fdata = array();
	$fdata["strName"] = "account_name";
	$fdata["ownerTable"] = "";
		$fdata["Label"]="Account Name"; 
	
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text area";
	$fdata["ViewFormat"]= "HTML";
	
		
		
		
		
		
	$fdata["GoodName"]= "account_name";
	
		$fdata["FullName"]= "\"\"";
	
		
		
		
		
		
				$fdata["Index"]= 18;
			$fdata["EditParams"] = "";
			$fdata["EditParams"].= " rows=100";
		$fdata["nRows"] = 100;
			$fdata["EditParams"].= " cols=200";
		$fdata["nCols"] = 200;
		
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatacommercial_invoices["account_name"]=$fdata;
//	buyer
	$fdata = array();
	$fdata["strName"] = "buyer";
	$fdata["ownerTable"] = "";
		$fdata["Label"]="Buyer"; 
	
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text area";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "buyer";
	
		$fdata["FullName"]= "\"\"";
	
		
		
		
		
		
				$fdata["Index"]= 19;
			$fdata["EditParams"] = "";
			$fdata["EditParams"].= " rows=100";
		$fdata["nRows"] = 100;
			$fdata["EditParams"].= " cols=200";
		$fdata["nCols"] = 200;
		
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatacommercial_invoices["buyer"]=$fdata;
//	consignee
	$fdata = array();
	$fdata["strName"] = "consignee";
	$fdata["ownerTable"] = "";
		$fdata["Label"]="Consignee"; 
	
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text area";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "consignee";
	
		$fdata["FullName"]= "\"\"";
	
		
		
		
		
		
				$fdata["Index"]= 20;
			$fdata["EditParams"] = "";
			$fdata["EditParams"].= " rows=100";
		$fdata["nRows"] = 100;
			$fdata["EditParams"].= " cols=200";
		$fdata["nCols"] = 200;
		
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatacommercial_invoices["consignee"]=$fdata;
//	notify
	$fdata = array();
	$fdata["strName"] = "notify";
	$fdata["ownerTable"] = "";
		$fdata["Label"]="Notify"; 
	
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text area";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "notify";
	
		$fdata["FullName"]= "\"\"";
	
		
		
		
		
		
				$fdata["Index"]= 21;
			$fdata["EditParams"] = "";
			$fdata["EditParams"].= " rows=100";
		$fdata["nRows"] = 100;
			$fdata["EditParams"].= " cols=200";
		$fdata["nCols"] = 200;
		
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatacommercial_invoices["notify"]=$fdata;
//	proforma_invoice_id
	$fdata = array();
	$fdata["strName"] = "proforma_invoice_id";
	$fdata["ownerTable"] = "commercial_invoices";
		$fdata["Label"]="Proforma Invoice Id"; 
	
		
		
	$fdata["FieldType"]= 3;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Lookup wizard";
	$fdata["ViewFormat"]= "";
	
		
		$fdata["LookupType"]=1;
	$fdata["pLookupType"] = 1;
	$fdata["freeInput"] = 0;	
	$fdata["autoCompleteFieldsOnEdit"] = 0;
	$fdata["autoCompleteFields"] = array();
	$fdata["autoCompleteFields"][] = array('masterF'=>"account_id", 'lookupF'=>"account_id");
	$fdata["autoCompleteFields"][] = array('masterF'=>"buyer_id", 'lookupF'=>"buyer_id");
	$fdata["autoCompleteFields"][] = array('masterF'=>"consignee_id", 'lookupF'=>"consignee_id");
	$fdata["autoCompleteFields"][] = array('masterF'=>"notify_id", 'lookupF'=>"notify_id");
										$fdata["LinkField"]="id";
	$fdata["LinkFieldType"]=3;
	$fdata["DisplayField"]="proforma_invoice_no";
				$fdata["LookupTable"]="proforma_invoices";
	$fdata["LookupOrderBy"]="proforma_invoice_no";
																			
					
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "proforma_invoice_id";
	
		$fdata["FullName"]= "proforma_invoice_id";
	
		
		
		
		
		
				$fdata["Index"]= 22;
				
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
						
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatacommercial_invoices["proforma_invoice_id"]=$fdata;

	
$tables_data["commercial_invoices"]=&$tdatacommercial_invoices;
$field_labels["commercial_invoices"] = &$fieldLabelscommercial_invoices;
$fieldToolTips["commercial_invoices"] = &$fieldToolTipscommercial_invoices;

// -----------------start  prepare master-details data arrays ------------------------------//
// tables which are detail tables for current table (master)
$detailsTablesData["commercial_invoices"] = array();
$dIndex = 1-1;
			$strOriginalDetailsTable="commercial_invoice_items";
	$detailsTablesData["commercial_invoices"][$dIndex] = array(
		  "dDataSourceTable"=>"commercial_invoice_items"
		, "dOriginalTable"=>$strOriginalDetailsTable
		, "dShortTable"=>"commercial_invoice_items"
		, "masterKeys"=>array()
		, "detailKeys"=>array()
		, "dispChildCount"=> "1"
		, "hideChild"=>"0"
		, "sqlHead"=>"SELECT id,   commercial_invoice_id,   packages,   quantity,   net_weight,   gross_weight,   description,   unit_price,   total_value"	
		, "sqlFrom"=>"FROM commercial_invoice_items"	
		, "sqlWhere"=>""
		, "sqlTail"=>""
		, "groupBy"=>"0"
		, "previewOnList" => 1
		, "previewOnAdd" => 1
		, "previewOnEdit" => 1
		, "previewOnView" => 1
	);	
		$detailsTablesData["commercial_invoices"][$dIndex]["masterKeys"][]="id";
		$detailsTablesData["commercial_invoices"][$dIndex]["detailKeys"][]="commercial_invoice_id";


	
// tables which are master tables for current table (detail)
$masterTablesData["commercial_invoices"] = array();

// -----------------end  prepare master-details data arrays ------------------------------//

require_once(getabspath("classes/sql.php"));










$proto139=array();
$proto139["m_strHead"] = "SELECT";
$proto139["m_strFieldList"] = "id,  account_id,  buyer_id,  consignee_id,  notify_id,  commercial_invoice_no,  commercial_invoice_date,  customer_purchase_order_no,  bl_awb_no,  country_id,  export_date,  payment_term,  export_references,  export_route,  package_marks,  misc_charges,  certifications,  \"\" AS account_name,  \"\" AS buyer,  \"\" AS consignee,  \"\" AS notify,  proforma_invoice_id";
$proto139["m_strFrom"] = "FROM commercial_invoices";
$proto139["m_strWhere"] = "";
$proto139["m_strOrderBy"] = "";
$proto139["m_strTail"] = "";
$proto140=array();
$proto140["m_sql"] = "";
$proto140["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

$proto140["m_column"]=$obj;
$proto140["m_contained"] = array();
$proto140["m_strCase"] = "";
$proto140["m_havingmode"] = "0";
$proto140["m_inBrackets"] = "0";
$proto140["m_useAlias"] = "0";
$obj = new SQLLogicalExpr($proto140);

$proto139["m_where"] = $obj;
$proto142=array();
$proto142["m_sql"] = "";
$proto142["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

$proto142["m_column"]=$obj;
$proto142["m_contained"] = array();
$proto142["m_strCase"] = "";
$proto142["m_havingmode"] = "0";
$proto142["m_inBrackets"] = "0";
$proto142["m_useAlias"] = "0";
$obj = new SQLLogicalExpr($proto142);

$proto139["m_having"] = $obj;
$proto139["m_fieldlist"] = array();
						$proto144=array();
			$obj = new SQLField(array(
	"m_strName" => "id",
	"m_strTable" => "commercial_invoices"
));

$proto144["m_expr"]=$obj;
$proto144["m_alias"] = "";
$obj = new SQLFieldListItem($proto144);

$proto139["m_fieldlist"][]=$obj;
						$proto146=array();
			$obj = new SQLField(array(
	"m_strName" => "account_id",
	"m_strTable" => "commercial_invoices"
));

$proto146["m_expr"]=$obj;
$proto146["m_alias"] = "";
$obj = new SQLFieldListItem($proto146);

$proto139["m_fieldlist"][]=$obj;
						$proto148=array();
			$obj = new SQLField(array(
	"m_strName" => "buyer_id",
	"m_strTable" => "commercial_invoices"
));

$proto148["m_expr"]=$obj;
$proto148["m_alias"] = "";
$obj = new SQLFieldListItem($proto148);

$proto139["m_fieldlist"][]=$obj;
						$proto150=array();
			$obj = new SQLField(array(
	"m_strName" => "consignee_id",
	"m_strTable" => "commercial_invoices"
));

$proto150["m_expr"]=$obj;
$proto150["m_alias"] = "";
$obj = new SQLFieldListItem($proto150);

$proto139["m_fieldlist"][]=$obj;
						$proto152=array();
			$obj = new SQLField(array(
	"m_strName" => "notify_id",
	"m_strTable" => "commercial_invoices"
));

$proto152["m_expr"]=$obj;
$proto152["m_alias"] = "";
$obj = new SQLFieldListItem($proto152);

$proto139["m_fieldlist"][]=$obj;
						$proto154=array();
			$obj = new SQLField(array(
	"m_strName" => "commercial_invoice_no",
	"m_strTable" => "commercial_invoices"
));

$proto154["m_expr"]=$obj;
$proto154["m_alias"] = "";
$obj = new SQLFieldListItem($proto154);

$proto139["m_fieldlist"][]=$obj;
						$proto156=array();
			$obj = new SQLField(array(
	"m_strName" => "commercial_invoice_date",
	"m_strTable" => "commercial_invoices"
));

$proto156["m_expr"]=$obj;
$proto156["m_alias"] = "";
$obj = new SQLFieldListItem($proto156);

$proto139["m_fieldlist"][]=$obj;
						$proto158=array();
			$obj = new SQLField(array(
	"m_strName" => "customer_purchase_order_no",
	"m_strTable" => "commercial_invoices"
));

$proto158["m_expr"]=$obj;
$proto158["m_alias"] = "";
$obj = new SQLFieldListItem($proto158);

$proto139["m_fieldlist"][]=$obj;
						$proto160=array();
			$obj = new SQLField(array(
	"m_strName" => "bl_awb_no",
	"m_strTable" => "commercial_invoices"
));

$proto160["m_expr"]=$obj;
$proto160["m_alias"] = "";
$obj = new SQLFieldListItem($proto160);

$proto139["m_fieldlist"][]=$obj;
						$proto162=array();
			$obj = new SQLField(array(
	"m_strName" => "country_id",
	"m_strTable" => "commercial_invoices"
));

$proto162["m_expr"]=$obj;
$proto162["m_alias"] = "";
$obj = new SQLFieldListItem($proto162);

$proto139["m_fieldlist"][]=$obj;
						$proto164=array();
			$obj = new SQLField(array(
	"m_strName" => "export_date",
	"m_strTable" => "commercial_invoices"
));

$proto164["m_expr"]=$obj;
$proto164["m_alias"] = "";
$obj = new SQLFieldListItem($proto164);

$proto139["m_fieldlist"][]=$obj;
						$proto166=array();
			$obj = new SQLField(array(
	"m_strName" => "payment_term",
	"m_strTable" => "commercial_invoices"
));

$proto166["m_expr"]=$obj;
$proto166["m_alias"] = "";
$obj = new SQLFieldListItem($proto166);

$proto139["m_fieldlist"][]=$obj;
						$proto168=array();
			$obj = new SQLField(array(
	"m_strName" => "export_references",
	"m_strTable" => "commercial_invoices"
));

$proto168["m_expr"]=$obj;
$proto168["m_alias"] = "";
$obj = new SQLFieldListItem($proto168);

$proto139["m_fieldlist"][]=$obj;
						$proto170=array();
			$obj = new SQLField(array(
	"m_strName" => "export_route",
	"m_strTable" => "commercial_invoices"
));

$proto170["m_expr"]=$obj;
$proto170["m_alias"] = "";
$obj = new SQLFieldListItem($proto170);

$proto139["m_fieldlist"][]=$obj;
						$proto172=array();
			$obj = new SQLField(array(
	"m_strName" => "package_marks",
	"m_strTable" => "commercial_invoices"
));

$proto172["m_expr"]=$obj;
$proto172["m_alias"] = "";
$obj = new SQLFieldListItem($proto172);

$proto139["m_fieldlist"][]=$obj;
						$proto174=array();
			$obj = new SQLField(array(
	"m_strName" => "misc_charges",
	"m_strTable" => "commercial_invoices"
));

$proto174["m_expr"]=$obj;
$proto174["m_alias"] = "";
$obj = new SQLFieldListItem($proto174);

$proto139["m_fieldlist"][]=$obj;
						$proto176=array();
			$obj = new SQLField(array(
	"m_strName" => "certifications",
	"m_strTable" => "commercial_invoices"
));

$proto176["m_expr"]=$obj;
$proto176["m_alias"] = "";
$obj = new SQLFieldListItem($proto176);

$proto139["m_fieldlist"][]=$obj;
						$proto178=array();
			$obj = new SQLNonParsed(array(
	"m_sql" => "\"\""
));

$proto178["m_expr"]=$obj;
$proto178["m_alias"] = "account_name";
$obj = new SQLFieldListItem($proto178);

$proto139["m_fieldlist"][]=$obj;
						$proto180=array();
			$obj = new SQLNonParsed(array(
	"m_sql" => "\"\""
));

$proto180["m_expr"]=$obj;
$proto180["m_alias"] = "buyer";
$obj = new SQLFieldListItem($proto180);

$proto139["m_fieldlist"][]=$obj;
						$proto182=array();
			$obj = new SQLNonParsed(array(
	"m_sql" => "\"\""
));

$proto182["m_expr"]=$obj;
$proto182["m_alias"] = "consignee";
$obj = new SQLFieldListItem($proto182);

$proto139["m_fieldlist"][]=$obj;
						$proto184=array();
			$obj = new SQLNonParsed(array(
	"m_sql" => "\"\""
));

$proto184["m_expr"]=$obj;
$proto184["m_alias"] = "notify";
$obj = new SQLFieldListItem($proto184);

$proto139["m_fieldlist"][]=$obj;
						$proto186=array();
			$obj = new SQLField(array(
	"m_strName" => "proforma_invoice_id",
	"m_strTable" => "commercial_invoices"
));

$proto186["m_expr"]=$obj;
$proto186["m_alias"] = "";
$obj = new SQLFieldListItem($proto186);

$proto139["m_fieldlist"][]=$obj;
$proto139["m_fromlist"] = array();
												$proto188=array();
$proto188["m_link"] = "SQLL_MAIN";
			$proto189=array();
$proto189["m_strName"] = "commercial_invoices";
$proto189["m_columns"] = array();
$proto189["m_columns"][] = "id";
$proto189["m_columns"][] = "account_id";
$proto189["m_columns"][] = "buyer_id";
$proto189["m_columns"][] = "consignee_id";
$proto189["m_columns"][] = "notify_id";
$proto189["m_columns"][] = "commercial_invoice_no";
$proto189["m_columns"][] = "commercial_invoice_date";
$proto189["m_columns"][] = "customer_purchase_order_no";
$proto189["m_columns"][] = "bl_awb_no";
$proto189["m_columns"][] = "country_id";
$proto189["m_columns"][] = "export_date";
$proto189["m_columns"][] = "payment_term";
$proto189["m_columns"][] = "export_references";
$proto189["m_columns"][] = "export_route";
$proto189["m_columns"][] = "package_marks";
$proto189["m_columns"][] = "misc_charges";
$proto189["m_columns"][] = "certifications";
$proto189["m_columns"][] = "proforma_invoice_id";
$obj = new SQLTable($proto189);

$proto188["m_table"] = $obj;
$proto188["m_alias"] = "";
$proto190=array();
$proto190["m_sql"] = "";
$proto190["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

$proto190["m_column"]=$obj;
$proto190["m_contained"] = array();
$proto190["m_strCase"] = "";
$proto190["m_havingmode"] = "0";
$proto190["m_inBrackets"] = "0";
$proto190["m_useAlias"] = "0";
$obj = new SQLLogicalExpr($proto190);

$proto188["m_joinon"] = $obj;
$obj = new SQLFromListItem($proto188);

$proto139["m_fromlist"][]=$obj;
$proto139["m_groupby"] = array();
$proto139["m_orderby"] = array();
$obj = new SQLQuery($proto139);

$queryData_commercial_invoices = $obj;
$tdatacommercial_invoices[".sqlquery"] = $queryData_commercial_invoices;

include(getabspath("include/commercial_invoices_events.php"));
$tableEvents["commercial_invoices"] = new eventclass_commercial_invoices;

?>
